package com.rd.student.dashuju.wangbo.demo1;

public abstract class Drink {
    public abstract void taste();
    static final int COFFEE = 1;
    static final int BEAR = 2;
    static final int MILK = 3;
    public static Drink getDrink(int drinkType){
      switch (drinkType){
          case 1:
              return new Coffee();
          case 2:
              return new Beer();
          case 3:
              return new Milk();
          default:return null;
      }

    }
}
